Repository navigation
Conversation
nvaytet
approved these changes
Nov 13, 2026
| "neutron production (accelerator, target, etc.).\n\n" | ||
| "Use NeutronSourcePosition[RunType] or equivalently " | ||
| "Position[scippnexus.NXmoderator, RunType]. If this does not work for you, " | ||
| "insert your providder to overridethe one that produced this error." |
Member
There was a problem hiding this comment.
Suggested change
| "insert your providder to overridethe one that produced this error." | |
| "insert your provider to override the one that produced this error." |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #120
(Draft for now because I am using CI to run the tests)
I considered a couple of alternatives:
NeXusClass[snx.NXsource]as we used to do for BIFROST. But as noted in Consider loading source from NXmoderator #120 (comment), this breaks code that expectsComponent[snx.NXsource]to be an actual NXsource.compute_position(transform: NeXusTransformation[snx.NXmoderator) -> Position[snx.NXsource]This would avoid the problem in point 1, but would still be strange because it hides the actual NXsource and could lead to confusion.moderator_position: Position[snx.NXmoderator]in all providers. This would be clean but would lock us in to using the moderator everywhere.NeutronSourcePositiontype. This allows us to provide positions from either the moderator or source, depending on what file we read (e.g., ESS vs McStas)Position[snx.NXsource]because that is an easy mistake to make but hard to spot.@YooSunYoung The NMX workflow tests fail because the test file does not contain a moderator. Are the tests designed for actual ESS files or for simulation data? In the former case, we should update the file. In the latter, we should update the workflow to load NXsource.